package com.eboss2.sbs.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.eboss2.sbs.R;
import com.eboss2.sbs.activity.base.BaseActivity;
import com.mytools.tool.activityManager.MyActivityManager;
import com.tool.utils.view.ToggleButton;

import java.sql.ResultSet;

public class MyDetailOperatorActivity extends BaseActivity implements View.OnClickListener{

	private ToggleButton toggleButton;
	private TextView tv_account_no;
	private TextView tv_name;
	private TextView tv_phone;
	private TextView tv_time;
	private RelativeLayout rl_pwd;
	private RelativeLayout rl_device;
	private RelativeLayout rl_pos;
	private RelativeLayout rl_app;




	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		mContext = this;
		setContentView(R.layout.activity_my_detail_operator);
		MyActivityManager.getInstance().addActivity(this);
		initView();
	}
	
	private void initView(){
		showView(R.id.titleback_btn_back, true);
		setTvText(R.id.tv_title, "员工详情");
		setTvText(R.id.next_sure, "编辑员工资料");
		textView(R.id.next_sure).setTextSize(13);
		showView(R.id.next_sure, true);
		findViewById(R.id.titleback_btn_back).setOnClickListener(this);
		findViewById(R.id.next_sure).setOnClickListener(this);


		toggleButton = findViewById(R.id.mSliderBtn);
		toggleButton.setOpen(true);
		toggleButton.setOnToggleListener(new ToggleButton.OnToggleListener() {
			@Override
			public void onToggle(boolean isOpen) {
				toast(isOpen ? "开关" : "关闭");
			}
		});

		tv_account_no = textView(R.id.tv_account_no);
		tv_name = textView(R.id.tv_name);
		tv_phone = textView(R.id.tv_phone);
		tv_time = textView(R.id.tv_time);

		rl_pwd = relativeLayout(R.id.rl_pwd);
		rl_pwd.setOnClickListener(this);

		rl_device = relativeLayout(R.id.rl_device);
		rl_device.setOnClickListener(this);

		rl_pos = relativeLayout(R.id.rl_pos);
		rl_pos.setOnClickListener(this);

		rl_app = relativeLayout(R.id.rl_app);
		rl_app.setOnClickListener(this);



	}





	
	@Override
	public void onClick(View v) {
		switch (v.getId()) {
			case R.id.titleback_btn_back:
				finish();
				break;
			case R.id.next_sure:
				startActivity(new Intent(mContext, MyEditOperatorActivity.class));
				break;
			case R.id.rl_pwd:
				startActivity(new Intent(mContext, ResetOperatorPwdActivity.class));
				break;
			case R.id.rl_device:

				break;
			case R.id.rl_pos:
				startActivity(new Intent(mContext, MyDeviceFunctionActivity.class));
				break;
			case R.id.rl_app:
				startActivity(new Intent(mContext, MyAppFunctionActivity.class));
				break;
			default:break;
		}
	}

	
}
